<template>
  <div>
      评论内容<input type="text" v-model="comment">
      <router-link to='/showuser'><button @click="btn">提交</button></router-link>
  </div>
</template>

<script>
import axios from 'axios'
export default {
    data(){
        return{
          comment:'',
          id:this.$route.query.id
        }
    },methods:{
        btn(){
            axios.put('/api/login',{'id':this.id}).then(resp=>{
                alert(resp.data.msg)
                this.$router.go(0)
            }).catch(error=>{
                console.log(error)
            })
        }
    }
}
</script>

<style>

</style>